package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.SearchRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SearchWordExcludeMapper;
import com.ruoyi.system.domain.SearchWordExclude;
import com.ruoyi.system.service.ISearchWordExcludeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 检索排除Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-22
 */
@Service
public class SearchWordExcludeServiceImpl implements ISearchWordExcludeService 
{
    @Autowired
    private SearchWordExcludeMapper searchWordExcludeMapper;

    /**
     * 查询检索排除
     * 
     * @param id 检索排除主键
     * @return 检索排除
     */
    @Override
    public SearchWordExclude selectSearchWordExcludeById(Long id)
    {
        return searchWordExcludeMapper.selectSearchWordExcludeById(id);
    }

    /**
     * 查询检索排除列表
     * 
     * @param searchWordExclude 检索排除
     * @return 检索排除
     */
    @Override
    public List<SearchWordExclude> selectSearchWordExcludeList(SearchWordExclude searchWordExclude)
    {
        return searchWordExcludeMapper.selectSearchWordExcludeList(searchWordExclude);
    }

    /**
     * 新增检索排除
     * 
     * @param searchWordExclude 检索排除
     * @return 结果
     */
    @Override
    public int insertSearchWordExclude(SearchWordExclude searchWordExclude)
    {
        return searchWordExcludeMapper.insertSearchWordExclude(searchWordExclude);
    }

    /**
     * 修改检索排除
     * 
     * @param searchWordExclude 检索排除
     * @return 结果
     */
    @Override
    public int updateSearchWordExclude(SearchWordExclude searchWordExclude)
    {
        return searchWordExcludeMapper.updateSearchWordExclude(searchWordExclude);
    }

    /**
     * 批量删除检索排除
     * 
     * @param ids 需要删除的检索排除主键
     * @return 结果
     */
    @Override
    public int deleteSearchWordExcludeByIds(String ids)
    {
        return searchWordExcludeMapper.deleteSearchWordExcludeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除检索排除信息
     * 
     * @param id 检索排除主键
     * @return 结果
     */
    @Override
    public int deleteSearchWordExcludeById(Long id)
    {
        return searchWordExcludeMapper.deleteSearchWordExcludeById(id);
    }

    @Override
    public int changeStatus(SearchWordExclude searchWordExclude){
        return searchWordExcludeMapper.updateSearchWordExclude(searchWordExclude);
    }
}
